from .wifi import WifiConfig
from .device import DeviceConfig
from .user import UserConfig
from .sensor import SensorConfig
from .server import ServerConfig
from .codemao import CodemaoConfig
from .service import ServiceConfig
from .websocket import WebsocketConfig
from .ble import BLEConfig
from .log import LogConfig
from .mqtt import MqttConfig
from .firmware import FirmwareConfig

wifi_config = WifiConfig("wifi.json")
device_config = DeviceConfig("device.json")
user_config = UserConfig("user.json")
sensor_config = SensorConfig("sensor.json")
server_config = ServerConfig("server.json")
codemao_config = CodemaoConfig("codemao.json")
service_config = ServiceConfig("service.json")
websocket_config = WebsocketConfig("websocket.json")
ble_config = BLEConfig("ble.json")
log_config = LogConfig("log.json")
mqtt_config = MqttConfig("mqtt.json")
firmware_config = FirmwareConfig("firmware.json")

def get_all_configs():
    return {
        "wifi_config": wifi_config.get_config(),
        "device_config": device_config.get_config(),
        "user_config": user_config.get_config(),
        "server_config": server_config.get_config(),
        "service_config": service_config.get_config(),
        "websocket_config": websocket_config.get_config(),
        "ble_config": ble_config.get_config(),
        "log_config": log_config.get_config(),
        "mqtt_config": mqtt_config.get_config(),
        "firmware_config": firmware_config.get_config(),
    }
